<!-- 我的模块 -->

<template>
  <EasyRow v-if="one.type === 2" flex>
    <div>
      <EasyRow col3>
        <FormPhoto label="图片" bind="imgUrl" text="上传图片" folder="icon" :width="240" isPublic row2 required />
        <FormColor label="背景" bind="backColor" colorFormat="rgb" showAlpha noClear />
      </EasyRow>

      <EasyRow col3>
        <FormInput label="模块名称" bind="name" :max="8" required />
        <FormNum label="排序" bind="sort" :min="1" :max="999" tip="请输入" initMin required />
      </EasyRow>

      <EasyRow col3>
        <FormTree label="所属分组" bind="parentId" :dict="treeDict" required />
        <FormSelect label="跳转逻辑" bind="jumpLogic" :dict="DICT.JUMP" noClear required @change="changeJump" />
      </EasyRow>

      <FormTextarea v-if="one.jumpLogic === 1" label="目录" bind="forword" :max="255" :rows="[1, 5]" required />
      <FormLink v-if="one.jumpLogic === 2" label="链接" bind="jumpLink" required />

      <FormTextarea label="备注" bind="remark" :max="100" :rows="2" />
    </div>
  </EasyRow>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import MyJump from '@admin/views/System/Menu/MenuApp/FormAdd/MyJump'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyModule',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixTree()],

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: MyJump.methods,
}
</script>
